package com.gxh.controller.admin;

import com.gxh.dto.MachineSalePageQueryDTO;
import com.gxh.result.PageResult;
import com.gxh.result.Result;
import com.gxh.service.impl.MachineSaleServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/admin/machineSale")
@Api(tags = "设备销售管理")
@Slf4j
public class MachineSaleController {

    @Autowired
    private MachineSaleServiceImpl machineSaleService;

    @ApiModelProperty("售出记录分页查询")
    @GetMapping("/page")
    public Result<PageResult> pageQuery(MachineSalePageQueryDTO machineSalePageQueryDTO){
        log.info("售出记录分页查询：{}", machineSalePageQueryDTO);
        PageResult pageResult = machineSaleService.pageQuery(machineSalePageQueryDTO);
        return Result.success(pageResult);
    }



}
